package com.example.aop.config;

import com.example.aop.annotation.TestAnnotation;

import java.lang.annotation.Annotation;
import java.lang.reflect.Method;

/**
 * @author 朝花不迟暮
 * @version 1.0
 * @date 2021/1/29 23:26
 */
public class ReflectUtils
{
    public static void main(String[] args)
    {
        Class<TestAnnotation> aClass = TestAnnotation.class;
        Method[] methods = aClass.getDeclaredMethods();
        for (Method method : methods)
        {
            Annotation[] annotations = method.getDeclaredAnnotations();
            for (Annotation annotation : annotations)
            {
                System.out.println(annotation);
            }
        }
    }
}
